home *** CD-ROM | disk | FTP | other *** search
-
- Floppy Tool Kit, Version 1.0
- William Luitje
- 20 January 1994
-
- This is a collection of 5 small utilities which will
- help you use your floppy disks better. Since you
- probably worry more about how to get better speed and
- storage out of your hard disk, this is not likely a
- matter of pressing concern to you. However, floppies
- are going to be used for quite a while and by spending a
- few minutes with these utilities you can make things go
- a little bit faster each time you use a floppy.
-
- FLOPPARM
- ~~~~~~~~
- Floppies have been around a long time and have been
- improved since they first came out, not only in capacity
- but also in their mechanical speed. Unfortunately,
- system software can't tell what the best speed to drive
- a floppy is and must be compatible with old drives and
- so uses conservatively slow parameters. When accessing
- a floppy, the BIOS uses a table called the Disk Base
- Table for these parameters. This table can be found by
- looking at interrupt vector 0X1E. Since this table is
- usually set up in RAM by DOS, it is an easy thing to
- modify it for modern, fast drives. FLOPPARM will do
- this for you conveniently; simply run it with one of the
- three arguments SLOW, MEDIUM, or FAST. The parameters
- which are affected are:
-
- ˛ step rate and head unload time, which are parameters
- of the disk controller chip.
-
- ˛ head settle time, which is the amount of time taken
- after stepping from one track to another to wait for
- the head mechanism to stop vibrating.
-
- ˛ motor startup time, which is the amount of time
- taken to allow the spindle motor speed to stabilize
- after it first starts up.
-
- SLOW is provided for compatibility with really old
- drives; MEDIUM is somewhat faster than DOS 5; and FAST
- is pedal to metal! When run, FLOPPARM displays the
- parameters used. If run with no or an illegal argument,
- FLOPPARM will display a usage hint and the current
- values of the parameters.
-
- FLOPPARM also allows you to specify your own parameters
- by using the CUSTOM argument followed by an equals sign
- and the four parameters (step rate, head unload time,
- head settle time and motor startup time) separated by
- commas (no spaces allowed). For example a command
- equivalent to FLOPPARM MEDIUM would be
-
- flopparm custom=13,15,1,2
-
- Legal values for step rate and head unload time are from
- 0 to 15. Legal values for head settle time (in
- milliseconds) and motor startup time (in 1/8s of a
- second) are from 0 to 255
-
- Note that FLOPPARM is not a TSR and does not take up any
- DOS memory; it simply modifies a table which is already
- created by DOS. Once you decide which parameters to use,
- just put a line invoking FLOPPARM in your AUTOEXEC.BAT
- file and enjoy a modest increase in floppy speed.
-
- FLOPTEST
- ~~~~~~~~
- How can you tell if you have set your floppy drive
- parameters too fast? I've included a utility which will
- seek to every track of the disk, read a sector and
- report any errors it finds. The seek pattern is called
- a "butterfly test" since it reads the first track, then
- the last track, then the second track, then the next to
- last track, etc. This will really give the drive a
- workout!
-
- This test requires a formatted floppy which has no bad
- sectors (FLOPTEST can't tell if an error is due to the
- drive not working properly or due to a bad disk). It is
- a read only test so it shouldn't change any data on the
- disk. There are two parameters: one is the drive
- letter and the second is the number of passes to run.
- If you get any errors and your floppy is ok then you
- should back off one or more of the floppy drive
- parameters and test again. Here is an example
-
- floptest a 20
-
- If you are fortunate enough to have more than 2 disk
- drives (this applies both to FLOPTEST and to the other
- utilities in this package), you can refer to the third
- drive as c and the fourth drive as d, even if you have a
- hard drive that goes by either of those names. I know
- this is confusing but this test operates at the BIOS
- level and has no idea what letter DOS has assigned to
- your third and fourth floppies. I had a choice of
- confusing people who had more than 2 floppy drives or
- confusing everybody by making you specify the drive with
- a number rather than a letter. That's life.
-
- You can also use FLOPTEST to see if a floppy disk has
- any bad sectors. If you run it with only the drive
- letter specified, then it will attempt to read every
- sector and report any failures. Since FLOPTEST makes
- only one attempt to read each sector, it will warn you
- if a sector is getting weak.
-
- FLOPSKEW
- ~~~~~~~~
- The most important improvement you can make in using
- your floppy drives is to format your disks using
- FDFORMAT by Christoph HochstÑtter or ATFMT by Oleg
- Kibirev. These programs allow almost complete control
- over how your disks are formatted. Among other things,
- you can put up to 820K on 5¨" DSDD disks, 1.48 meg on
- 5¨" HD disks and 1.7 meg on 3´" HD disks. In terms of
- speeding up floppy disk transfers, these programs allow
- you to control the way sectors are arranged on a track.
- This concept is called sector sliding by FDFORMAT and
- sector spinning by ATFMT; in the US it's known as sector
- skewing. Basically, the idea is that since there is
- some mechanical delay in changing heads or tracks it may
- be desirable to put the first sector of a new head or
- track "later" in the track so the computer doesn't have
- to wait for the floppy to make a complete revolution
- before that sector can be read. See these programs'
- documentation for more details on how this works. The
- time savings when reading or writing a floppy can be
- substantial when you format it using the optimal skew
- parameters and, as an added benefit, formatting is
- faster, too.
-
- You can specify head skew and track skew in both
- FDFORMAT and ATFMT by the X and Y parameters,
- respectively. The DOS FORMAT program does not support
- sector skewing at all; this is equivalent to using
- FDFORMAT or ATFMT with X and Y both set to zero. But
- what values should you use for these parameters? Well,
- when FDFORMAT first introduced this feature, I wrote a
- batch file which formatted a test disk with various
- combinations of the head and sector skew parameters and
- then measured how long it took to copy a large file to
- the floppy. It took about an hour to run and tested 16
- combinations of X and Y values for just one disk format.
- FLOPSKEW does the same job in just a few seconds but
- tests even more combinations of parameter values.
-
- To use FLOPSKEW, first decide which setting of FLOPPARM
- to use and then run FLOPPARM with that parameter since
- the step rate and head settle time will both affect
- skewing. Then, format a disk of the type and capacity
- for which you want to find the optimal skewing
- parameters with the X and Y parameters both 0 and
- interleave 1. Although FLOPSKEW is a non-destructive
- test, you should use a freshly formatted disk to ensure
- that these parameters are set correctly, otherwise the
- test will give strange results. If you don't specify X
- and Y, FDFORMAT and ATFMT default to the correct values
- except that they both must use an interleave of 2 for
- the 5¨" 1.44 meg and 3´" 1.7 meg formats (and for this
- reason it doesn't make sense to use sector skewing with
- these formats). DOS FORMAT always formats with no sector
- skewing and interleave 1.
-
- Then, simply run FLOPSKEW with the drive letter of the
- floppy you want to test as the only parameter. Here is
- an example command and its results for a double density
- (720K) 3´" disk on my system:
-
- flopskew b
-
- Find Optimal Head & Track Skew, Ver 1.0
- 9 Sectors/Track, 80 Tracks, 2 Sides
-
- Head Skew Times (milliseconds):
- X: 0 1 2 3 4 5 6 7 8
- Time: 32 54 74 95 116 137 158 178 199
-
- Track Skew Times (milliseconds):
- Y: 0 1 2 3 4 5 6 7 8
- Time: 232 53 74 95 116 137 158 178 199
-
- Interleave: 1
- Minimum skewing parameters: X=0, Y=1
- Recommended skewing parameters: X=1, Y=2
-
- First you are shown the format of the test diskette,
- then some test results and finally the recommended
- skewing parameters. If you are interested in some
- technical details about the test you should read the
- next few paragraphs; otherwise you can skip ahead to the
- next section. Just use the recommended parameters to
- format your disks and expect your diskette throughput to
- become about 30% faster.
-
- Two tests are run to find the best values for the Head
- Skew parameter (X) and the Track Skew parameter (Y).
- The head skew test is run by reading the last sector of
- the first track using head 0 and then measuring how
- long, in milliseconds, it takes to read the first sector
- of that same track with head 1. (If the disk is
- formatted with only one side this test is not run.) The
- track skew test is run by reading the last sector of the
- first track using head 1 (if testing a double sided
- disk) and then measuring how long it takes to read the
- first sector of the second track using head 0. In the
- results above, the second line tells how long this took,
- in milliseconds, for each of the sectors on the second
- track read.
-
- Let's look at the example data to see what we can learn.
- First, notice that the times to read different sectors
- in the head skew test increase by about 22 milliseconds.
- This is just the time it takes to read one sector for
- this format. The formula is
-
- sector read time(ms) = 1000 * 60sec/min * rpm / sectors
-
- For this format the drive rotates at 300 rpm and there
- are 9 sectors so the time to read a sector works out to
- 22.2 milliseconds. This formula can be modified to
- figure the time to read an entire track by dropping the
- final division by sectors. In this case, it is 200 ms.
-
- To determine the best values for X and Y, the program
- finds the smallest time and the corresponding number of
- sectors skipped from the line above. The data show that
- for my system no sectors should be skipped when changing
- heads so the optimal head skew parameter, X, is 0.
- Typical values are 0 or 1 for most systems. Now look at
- the results for the track skewing test; the time to
- change tracks without skipping any sectors is 232! This
- is the time it takes to read a whole track plus the
- sector plus some overhead. In this case the 0 sector
- skew provided by DOS format and the default values used
- by FDFORMAT and ATFMT yield a big waste of time when
- reading or writing multiple tracks. On my system the
- optimal track skew parameter, Y, is 1. Typically, it
- ranges from 1 to 3 on the systems I have looked at.
-
- Now notice that the program recommends values for the
- skew parameters which are 1 greater than the optimal
- values. This is because the penalty for choosing a skew
- value which is too small is severe: you have to wait a
- whole revolution, in this case 200 ms, when changing
- tracks. On the other hand, the penalty for having a
- skew value which is one too big is only 22 ms. Since
- some software may introduce an additional delay when
- changing tracks, it is a safe bet to be conservative
- when choosing the skew values. If you regularly use
- floppies on two computers you should run FLOPSKEW on
- both of them and choose the higher of the recommended
- skew parameters.
-
- Take the values of X and Y found by the above procedure
- and use them to format your floppies in the future. To
- make this easy, you can create a batch file, 4DOS or CED
- alias, or FDFORMAT or ATFMT configuration file with
- those parameters in it. Any time you format a floppy or
- read or write a floppy formatted this way it will go
- faster.
-
- How much faster? Well, assuming the most likely case
- that only track seek is a problem and that the sector
- skewing is only off by 1 or 2, then on average the
- computer has to wait for a full disk revolution every
- second track it reads. Eliminate the wait and you can
- reduce the time spent reading and writing by 1/3. When
- formatting a diskette, skewing only affects the verify
- operation so the time reduction is somewhat less, about
- 20%.
-
- FLOPRPM
- ~~~~~~~
- If you are having trouble reading or writing diskettes,
- especially with a large number of sectors per track, the
- problem may lie with the speed at which the drive spins.
- FLOPRPM will test this condition for you. Simply place
- a formatted disk in the drive you want to test and run
- FLOPRPM with the drive letter as the only argument. The
- program will then test and display the rotation rate
- continuously until you press a key. Normally, all PC
- floppy drives will run within an RPM or two of 300
- except for 5¨" HD drives which run at 360. If you are
- having problems and the speed of your drive is off by
- more than that, you may be able to get better operation
- by adjusting the speed of your drive. Unfortunately, no
- general guidelines can be given about how to do that
- because drives differ in their design.
-
- FLOPINFO
- ~~~~~~~~
- This program simply reads the existing format of a disk
- and displays it. With all of the different formats
- supported by FDFORMAT and ATFMT it's nice to know what
- format a particular disk is. Also, since some of these
- formats require a TSR to read, you might want to know if
- a particular floppy can be read on another system which
- doesn't have a copy of that TSR available. Or, perhaps
- you want to quickly find out whether a floppy is HD or
- DD.
-
- FLOPINFO takes one parameter, the drive letter. Here is
- an example command and response, again for a 720K 3´"
- disk
-
- flopinfo b
-
- Floppy Disk Information, Ver. 1.0 by luitje@m-net.arbornet.org
- OEM Name: IBM 3.3, 512 Bytes/Sector, 9 Sectors/Track, 80 Tracks, 2 Sides
- 2 FATs, 1 Reserved Sectors, 112 Directory Entries
- Total Capacity is 730112
-
- Registration
- ~~~~~~~~~~~~
- While this software may be freely copied and used, I do
- request that you register it if you use it. Just send
- me either a postcard or some e-mail telling me who you
- are and where you are and what you like or dislike about
- the program. This is only partially an ego massage for
- the author. I enjoy writing useful utilities and have
- several other pieces of freeware out floating around the
- net so I would like feedback about which of them is
- worth expanding and supporting.
-
- This software is intended to be safe to use. All tests
- and information programs are read only. About the only
- problem you might have is that if you set the floppy
- drive parameters too fast you may get read or write
- errors. Never the less, in using this software you
- assume all risk should anything go wrong. I think that
- is pretty unlikely, but, hey, sometimes it rains fish!
-
- William Luitje
- 2677 Wayside Drive
- Ann Arbor, MI 48103
- USA
-
- Internet: luitje@m-net.arbornet.org or
- luitje@m-net.ann-arbor.mi.us
-
-